<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
</head>
<body>
<h1>员工编辑</h1>
<form action="/student/saveOrUpdate?id=${student.id}" method="POST">
    <input type="hidden" name="id" value="${student.id}">
    员工名称:<input type="text" name="name" value="${student.name}"><br>
    员工地址:<input type="text" name="address" value="${student.address}"><br>
    员工年龄:<input type="text" name="age" value="${student.age}"><br>
    员工年级:
    <select name="grade_id">
        <c:forEach items="${grades}" var="grade">
            <option value="${grade.id}" ${grade.id==student.grade_id?'selected':''}>${grade.name}</option>
        </c:forEach>
    </select>
    <input type="submit" value="提交">
</form>
</body>
</html>